<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsecure: xsecure_aesclient.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsecure
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xsecure__aesclient_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xsecure_aesclient.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the implementation of the client interface functions for AES driver. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.0   kal  03/23/21 Initial release
4.5   kal  03/23/20 Updated file version to sync with library version
      har  04/14/21 Added XSecure_AesEncryptData and XSecure_AesDecryptData
4.6   har  08/31/21 Updated check for Size in XSecure_AesKekDecrypt
      kpt  09/27/21 Fixed compilation warnings
4.7   kpt  11/29/21 Replaced Xil_DCacheFlushRange with
                    XSecure_DCacheFlushRange
      kpt  01/13/21 Allocated CDO structure's in shared memory set by the
                    user
      am   03/08/22 Fixed MISRA C violations
      kpt  03/16/22 Removed IPI related code and added mailbox support
5.0   kpt  07/24/22 Moved XSecure_AesDecryptKat and XSecure_AesDecryptCMKat
                    into XSecure_Katclient.c
      kpt  08/19/22 Added GMAC support
5.1   skg  12/14/22 Added SSIT Provisioning support
5.2   am   03/09/23 Replaced xsecure payload lengths with xmailbox payload lengths
      yog  05/04/23 Fixed HIS COMF violations
5.3     vss  10/03/23 Added single API support for AES AAD and GMAC operations
      vss  03/04/24 Removed code redundancy for AesPerformOperation API
5.4   yog  04/29/24 Fixed doxygen warnings.</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2768b0d967bc577d2721682881592bb7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga2768b0d967bc577d2721682881592bb7">XSecure_AesInitialize</a> (XSecure_ClientInstance *InstancePtr)</td></tr>
<tr class="memdesc:ga2768b0d967bc577d2721682881592bb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to initialize the AES engine.  <a href="group__xsecure__aes__client__apis.html#ga2768b0d967bc577d2721682881592bb7">More...</a><br/></td></tr>
<tr class="separator:ga2768b0d967bc577d2721682881592bb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23f9b2bfaf978518d82c19d8331c9cb8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga23f9b2bfaf978518d82c19d8331c9cb8">XSecure_AesEncryptInit</a> (XSecure_ClientInstance *InstancePtr, <a class="el" href="group__xsecure__aes__client__apis.html#ga3be7525f93a2e54baa60c3b1a9df262c">XSecure_AesKeySource</a> KeySrc, u32 Size, u64 IvAddr)</td></tr>
<tr class="memdesc:ga23f9b2bfaf978518d82c19d8331c9cb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to EncryptInit the AES engine.  <a href="group__xsecure__aes__client__apis.html#ga23f9b2bfaf978518d82c19d8331c9cb8">More...</a><br/></td></tr>
<tr class="separator:ga23f9b2bfaf978518d82c19d8331c9cb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacea2fc49243f66d0b440a95d1bd6170f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#gacea2fc49243f66d0b440a95d1bd6170f">XSecure_AesDecryptInit</a> (XSecure_ClientInstance *InstancePtr, <a class="el" href="group__xsecure__aes__client__apis.html#ga3be7525f93a2e54baa60c3b1a9df262c">XSecure_AesKeySource</a> KeySrc, u32 Size, u64 IvAddr)</td></tr>
<tr class="memdesc:gacea2fc49243f66d0b440a95d1bd6170f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to DecryptInit the AES engine.  <a href="group__xsecure__aes__client__apis.html#gacea2fc49243f66d0b440a95d1bd6170f">More...</a><br/></td></tr>
<tr class="separator:gacea2fc49243f66d0b440a95d1bd6170f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab23a3dfb8aadcc94500201af5f25b659"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#gab23a3dfb8aadcc94500201af5f25b659">XSecure_AesUpdateAad</a> (XSecure_ClientInstance *InstancePtr, u64 AadAddr, u32 AadSize)</td></tr>
<tr class="memdesc:gab23a3dfb8aadcc94500201af5f25b659"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to update AAD to AES engine.  <a href="group__xsecure__aes__client__apis.html#gab23a3dfb8aadcc94500201af5f25b659">More...</a><br/></td></tr>
<tr class="separator:gab23a3dfb8aadcc94500201af5f25b659"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2c662c76ab7afdb97977628d81604ec1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga2c662c76ab7afdb97977628d81604ec1">XSecure_AesGmacUpdateAad</a> (XSecure_ClientInstance *InstancePtr, u64 AadAddr, u32 AadSize, u32 IsLastChunkSrc)</td></tr>
<tr class="memdesc:ga2c662c76ab7afdb97977628d81604ec1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to update AAD data to AES engine.  <a href="group__xsecure__aes__client__apis.html#ga2c662c76ab7afdb97977628d81604ec1">More...</a><br/></td></tr>
<tr class="separator:ga2c662c76ab7afdb97977628d81604ec1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga162a8009f9d4983d841b517fe53d14c4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga162a8009f9d4983d841b517fe53d14c4">XSecure_AesEncryptUpdate</a> (XSecure_ClientInstance *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u32 IsLast)</td></tr>
<tr class="memdesc:ga162a8009f9d4983d841b517fe53d14c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to update the input data to AES engine for encryption.  <a href="group__xsecure__aes__client__apis.html#ga162a8009f9d4983d841b517fe53d14c4">More...</a><br/></td></tr>
<tr class="separator:ga162a8009f9d4983d841b517fe53d14c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga982cb284b765c652355d9f942798211b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga982cb284b765c652355d9f942798211b">XSecure_AesEncryptFinal</a> (XSecure_ClientInstance *InstancePtr, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:ga982cb284b765c652355d9f942798211b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to update the GcmTag Addr to AES engine.  <a href="group__xsecure__aes__client__apis.html#ga982cb284b765c652355d9f942798211b">More...</a><br/></td></tr>
<tr class="separator:ga982cb284b765c652355d9f942798211b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3150fb8656509ac0217c44c9609776cc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga3150fb8656509ac0217c44c9609776cc">XSecure_AesDecryptUpdate</a> (XSecure_ClientInstance *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u32 IsLast)</td></tr>
<tr class="memdesc:ga3150fb8656509ac0217c44c9609776cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to update the encrypted data to AES engine for decryption.  <a href="group__xsecure__aes__client__apis.html#ga3150fb8656509ac0217c44c9609776cc">More...</a><br/></td></tr>
<tr class="separator:ga3150fb8656509ac0217c44c9609776cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga49114523757f3b39daf51876ba899e51"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga49114523757f3b39daf51876ba899e51">XSecure_AesDecryptFinal</a> (XSecure_ClientInstance *InstancePtr, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:ga49114523757f3b39daf51876ba899e51"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to verify the GcmTag provided for the data decrypted till the point.  <a href="group__xsecure__aes__client__apis.html#ga49114523757f3b39daf51876ba899e51">More...</a><br/></td></tr>
<tr class="separator:ga49114523757f3b39daf51876ba899e51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa3c4b19232e0c5fa8cf14d69410e31e7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#gaa3c4b19232e0c5fa8cf14d69410e31e7">XSecure_AesKeyZero</a> (XSecure_ClientInstance *InstancePtr, <a class="el" href="group__xsecure__aes__client__apis.html#ga3be7525f93a2e54baa60c3b1a9df262c">XSecure_AesKeySource</a> KeySrc)</td></tr>
<tr class="memdesc:gaa3c4b19232e0c5fa8cf14d69410e31e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to zeroize selected AES key storage register.  <a href="group__xsecure__aes__client__apis.html#gaa3c4b19232e0c5fa8cf14d69410e31e7">More...</a><br/></td></tr>
<tr class="separator:gaa3c4b19232e0c5fa8cf14d69410e31e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga056f80ac76299a3ed41102b9f21237e7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga056f80ac76299a3ed41102b9f21237e7">XSecure_AesWriteKey</a> (XSecure_ClientInstance *InstancePtr, <a class="el" href="group__xsecure__aes__client__apis.html#ga3be7525f93a2e54baa60c3b1a9df262c">XSecure_AesKeySource</a> KeySrc, u32 Size, u64 KeyAddr)</td></tr>
<tr class="memdesc:ga056f80ac76299a3ed41102b9f21237e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to write the key provided into the specified AES key registers.  <a href="group__xsecure__aes__client__apis.html#ga056f80ac76299a3ed41102b9f21237e7">More...</a><br/></td></tr>
<tr class="separator:ga056f80ac76299a3ed41102b9f21237e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5336eb4fdbdbd4c48776776c4524653e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga5336eb4fdbdbd4c48776776c4524653e">XSecure_AesKekDecrypt</a> (XSecure_ClientInstance *InstancePtr, u64 IvAddr, <a class="el" href="group__xsecure__aes__client__apis.html#ga3be7525f93a2e54baa60c3b1a9df262c">XSecure_AesKeySource</a> DstKeySrc, <a class="el" href="group__xsecure__aes__client__apis.html#ga3be7525f93a2e54baa60c3b1a9df262c">XSecure_AesKeySource</a> DecKeySrc, <a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a> Size)</td></tr>
<tr class="memdesc:ga5336eb4fdbdbd4c48776776c4524653e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to decrypt the key in KEK key form.  <a href="group__xsecure__aes__client__apis.html#ga5336eb4fdbdbd4c48776776c4524653e">More...</a><br/></td></tr>
<tr class="separator:ga5336eb4fdbdbd4c48776776c4524653e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2149f38c111ed53eec28fc05ac1afb1e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga2149f38c111ed53eec28fc05ac1afb1e">XSecure_AesSetDpaCm</a> (XSecure_ClientInstance *InstancePtr, u8 DpaCmCfg)</td></tr>
<tr class="memdesc:ga2149f38c111ed53eec28fc05ac1afb1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sends IPI request to enable/disable DpaCm in AES.  <a href="group__xsecure__aes__client__apis.html#ga2149f38c111ed53eec28fc05ac1afb1e">More...</a><br/></td></tr>
<tr class="separator:ga2149f38c111ed53eec28fc05ac1afb1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa65c921632e25a29b33b883d85cf9058"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#gaa65c921632e25a29b33b883d85cf9058">XSecure_AesEncryptData</a> (XSecure_ClientInstance *InstancePtr, <a class="el" href="group__xsecure__aes__client__apis.html#ga3be7525f93a2e54baa60c3b1a9df262c">XSecure_AesKeySource</a> KeySrc, u32 KeySize, u64 IvAddr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:gaa65c921632e25a29b33b883d85cf9058"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function calls IPI request to encrypt a single block of data.  <a href="group__xsecure__aes__client__apis.html#gaa65c921632e25a29b33b883d85cf9058">More...</a><br/></td></tr>
<tr class="separator:gaa65c921632e25a29b33b883d85cf9058"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga074dbaf57b453f094f14c6b6c7aca964"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga074dbaf57b453f094f14c6b6c7aca964">XSecure_AesDecryptData</a> (XSecure_ClientInstance *InstancePtr, <a class="el" href="group__xsecure__aes__client__apis.html#ga3be7525f93a2e54baa60c3b1a9df262c">XSecure_AesKeySource</a> KeySrc, u32 KeySize, u64 IvAddr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:ga074dbaf57b453f094f14c6b6c7aca964"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function calls IPI request to decrypt a single block of data.  <a href="group__xsecure__aes__client__apis.html#ga074dbaf57b453f094f14c6b6c7aca964">More...</a><br/></td></tr>
<tr class="separator:ga074dbaf57b453f094f14c6b6c7aca964"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1be5abccbec8cce45963a979c72828e1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__client__apis.html#ga1be5abccbec8cce45963a979c72828e1">XSecure_AesPerformOperation</a> (const XSecure_ClientInstance *InstancePtr, const <a class="el" href="struct_x_secure___aes_data_block_params.html">XSecure_AesDataBlockParams</a> *AesDataParams)</td></tr>
<tr class="memdesc:ga1be5abccbec8cce45963a979c72828e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function calls IPI request to encrypt/decrypt a single block of data along with update AAD/GMAC based on the user's choice.  <a href="group__xsecure__aes__client__apis.html#ga1be5abccbec8cce45963a979c72828e1">More...</a><br/></td></tr>
<tr class="separator:ga1be5abccbec8cce45963a979c72828e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
